#ifndef __EVENT__TYPEH__
#define __EVENT__TYPEH__
#include "../DataStructureH/queue.h"
namespace event
{
enum class EventType_t
{
};
union EventData_t {
    int d_value;
    float f_value;
    char str[8];
};
struct Event
{
    EventType_t type;
    EventData_t data;
};
extern queue<Event> EventQueue;
typedef void (*EventHandler)(Event e);

using ListenerList = std::vector<EventHandler>;

class EventQueue : public queue<Event>
{
    void addListener(ListenerList& listeners, Event e);
    void EventLoop(bool& running);
    void dispatchEvent(ListenerList& listeners, Event e);
};

} // namespace event
#endif